package marvin.webapp.audio.util;

import javax.faces.application.FacesMessage;

import org.primefaces.push.PushContext;
import org.primefaces.push.PushContextFactory;

public class PushNotifier {
	public static final String NOTIFICATION_CHANNEL = "/notificationsChannel";
	
	public static void sendNotification(String title, String message){
		 PushContext pushContext = PushContextFactory.getDefault().getPushContext();  
         pushContext.push(NOTIFICATION_CHANNEL, new FacesMessage(title, message));
         //System.out.println("Send notification");
	}
}
